package com.mz.mattress.client.task.handler;

import com.mz.mattress.client.task.AbstractStepTaskHandler;
import com.mz.mattress.client.task.TaskStep;
import com.mz.mattress.client.task.pojo.MemberStepBean;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.io.Serializable;

//任务步骤处理器
@Slf4j
@Service
public class MemberNewStepTaskHandler extends AbstractStepTaskHandler<MemberStepBean> implements Serializable {

    private static final long serialVersionUID = 1L;

    @Override
    public void finishTask(MemberStepBean data) {
        log.info("结束任务");
    }

    @TaskStep(3)
    public void register(MemberStepBean task) {
        log.info("注册会员");
    }

    @TaskStep(value = 1, delayTime = 3)
    public void doAction(MemberStepBean task) {
        log.info("下订单");
    }

    @TaskStep(2)
    public void submit(MemberStepBean task) {
        log.info("核销订单");
    }

}
